#include "../test_type.h"
#include <iostream>
#include "../../src/thread/SharedPtr.h"
#include "../../src/tools/ShareApi.h"
#include "../../src/stream/SocketIoBuffer.h"
#include "../../src/socket/TcpIoSocket.h"
#include "../../src/socket/TcpIoServer.h"
#ifdef STD11
#	include <memory>
#endif

using namespace std;
using namespace LibTools;


#ifdef TEST_SHAREDPTR
int main()
{
	while (true)
	{
		cout << "test start:" << endl;
		SharedPtr<CSocketIoBuffer> io(new CSocketIoBuffer(1024*10));
		SharedPtr<CSocketIoBuffer> tmp;
		tmp = io;
		std::swap(io, tmp);
		cout << "test end:" << endl;

#ifdef STD11
		CTcpIoServer tcp;
		CTcpIoSocket  sock;
		sock.Socket();
		sock.SetTcpService(tcp.GetTcpServerPtr());

		CTcpIoSocket sock2 = std::move(sock);
#endif
	}

	return 0;
}
#endif
